package com.bw.shop2208a.Fragment

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.lifecycle.lifecycleScope
import com.blankj.utilcode.util.SPUtils
import com.bw.shop2208a.R
import com.bw.shop2208a.databinding.FragmentMineBinding
import com.bw.shop2208a.db.DBUtils
import com.bw.shop2208a.mvvm.BaseViewFragment
import kotlinx.coroutines.launch


class MineFragment : BaseViewFragment<FragmentMineBinding>() {
    override fun initViwe() {
        lifecycleScope.launch {
            val result =
                DBUtils.getMyDataBaer().getUserDao().getUserById(SPUtils.getInstance().getInt("id"))
            binding.user = result
        }
    }

    override fun iniData() {

    }

    override fun getLayoutId(): Int = R.layout.fragment_mine

}